#ifndef SIMPLE_SHADER_PROGRAM_H
#define SIMPLE_SHADER_PROGRAM_H

#include <QOpenGLFunctions>
#include <QOpenGLShader>
#include <QOpenGLShaderProgram>
#include "shader_program.h"

class SimpleShaderProgram : public ShaderProgram {
    public:
        explicit SimpleShaderProgram(const char* vetexShaderSrc, const char* fragmentShaderSrc):
            ShaderProgram(vetexShaderSrc, fragmentShaderSrc){
                // 属性在program中的位置
                m_uColor= m_program->uniformLocation("u_Color");
            };
        ~SimpleShaderProgram() = default;

        inline int getUniformColor(){
            return m_uColor;
        };

    private:
        int m_uColor = -1;
};
#endif // SIMPLE_SHADER_PROGRAM_H
